#pragma once

#include "include.h"
#include <vector>


class PPOPHIES_CLASS CInstanceObject
{
public:
	CInstanceObject()				{};
	virtual ~CInstanceObject()		{};

public:
	void	SetInstanceType(int nType)		{ m_nInstanceType = nType; }
	int		GetInstanceType()				{ return m_nInstanceType; }

	void	SetStudyKey(CString strKey)		{ m_strStudyKey = strKey; }
	CString GetStudyKey()					{ return m_strStudyKey; }
	void	SetSeriesKey(CString strKey)	{ m_strSeriesKey = strKey; }
	CString GetSeriesKey()					{ return m_strSeriesKey; }

	void	ResetWadoInstancePath()							{ m_arrWadoInstancePath.RemoveAll(); }
	void	AddWadoInstancePath(CString strInatancePath)	{ m_arrWadoInstancePath.Add( strInatancePath ); }

	void	ResetWebInstancePath()							{ m_arrWebInstancePath.RemoveAll(); }
	void	AddWebInstancePath(CString strInstancePath)		{ m_arrWebInstancePath.Add( strInstancePath ); }

	CStringArray& GetWadoInstancePath()			{ return m_arrWadoInstancePath; }
	CStringArray& GetWebInstancePath()			{ return m_arrWebInstancePath; }


protected:
	int				m_nInstanceType;

	CString			m_strStudyKey;
	CString			m_strSeriesKey;

	CStringArray	m_arrWadoInstancePath;
	CStringArray	m_arrWebInstancePath;
};

class PPOPHIES_CLASS CInstanceStudy : public CInstanceObject
{
public:
	CInstanceStudy()				{};
	virtual ~CInstanceStudy()		{};

public:
	//CString	m_strStudyKey;
	CString	m_strGroupKey;
	CString	m_strStudyInsUID;
	CString	m_strPatientKey;
	CString	m_strPID;
	CString	m_strPName;
	CString	m_strPSex;
	CString	m_strPBirthDate;
	CString	m_strPBirthTime;
	CString	m_strPAge;
	CString	m_strPatientWeight;
	CString	m_strPatientSize;
	CString	m_strStudyID;
	CString	m_strStudyDate;
	CString	m_strStudyTime;
	CString	m_strAccessNo;
	CString	m_strStudyDesc;
	CString	m_strStudyCnt;
	CString	m_strSeriesCnt;
	CString	m_strInstanceCnt;
	CString	m_strCreateDateTime;
	CString	m_strUpdatedDateTime;
	CString	m_strDeleteDateTime;
	CString	m_strSelfUrl;
};

class PPOPHIES_CLASS CInstanceSeries : public CInstanceObject
{
public:
	CInstanceSeries()				{};
	virtual ~CInstanceSeries()		{};

public:
	//CString	m_strSeriesKey;
	CString m_strGroupKey;
	CString m_strSeriesInsUID;
	//CString m_strStudyKey;
	CString m_strModality;
	CString m_strSeriesNo;
	CString m_strSeriesDate;
	CString m_strSeriesTime;
	CString m_strSeriesDesc;
	CString m_strBodyPart;
	CString m_strSeriesSize;
	CString m_strInstanceCnt;
	CString m_strCreateDateTime;
	CString m_strDeleteDateTime;
	CString m_strSelfUrl;
};

class PPOPHIES_CLASS CInstanceImage : public CInstanceObject
{
public:
	CInstanceImage()				{};
	virtual ~CInstanceImage()		{};

public:
	CString m_strInstanceKey;
	CString m_strGroupKey;
	CString m_strSOPInsUID;
	CString m_strSOPClassUID;
	CString m_strSeriesKey;
	CString m_strStudyKey;
	CString m_strInstanceNo;
	CString m_strContentDate;
	CString m_strContentTime;
	CString m_strInstanceSize;
	CString m_strCreateDateTime;
	CString m_strDeleteDateTime;
	CString m_strSelfUrl;
};

class PPOPHIES_CLASS CInstanceDocSet : public CInstanceObject
{
	CInstanceDocSet()				{};
	virtual ~CInstanceDocSet()		{};
};

class PPOPHIES_CLASS CInstancePatient : public CInstanceObject
{
	CInstancePatient()				{};
	virtual ~CInstancePatient()		{};
};

class PPOPHIES_CLASS CInstanceInternal
{
public:
	CInstanceInternal();
	virtual ~CInstanceInternal();

	//enum { TYPE_NONE = 0, TYPE_STUDY, TYPE_SERIES, TYPE_INSTANCE, TYPE_DOCSET, TYPE_PATIENT };

public:
	std::vector<CInstanceStudy*>		m_StudyList;
	std::vector<CInstanceSeries*>		m_SeriesList;
	std::vector<CInstanceImage*>		m_InstanceList;
	std::vector<CInstanceDocSet*>		m_DocSetList;
	std::vector<CInstancePatient*>		m_PatientList;
};